package com.api.manage.feign.system;

import com.api.manage.factory.LogFeignClientFallback;
import com.api.manage.pojo.product.SysCategoryBean;
import com.api.manage.pojo.system.SysBranchOfficeBean;
import com.api.manage.pojo.system.SysBranchOfficeResources;
import com.api.manage.pojo.system.SysDepartmentBean;
import com.tem.common.tool.result.ResultUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import static com.api.common.ApiConstants.SystemService;

@Service
@FeignClient(value = SystemService, fallbackFactory = LogFeignClientFallback.class)
public interface SystemClientService {
    @GetMapping("/dept/getSysDepartmentBeanById{id}")
    public ResultUtil<SysDepartmentBean> getSysDepartmentBeanById(@PathVariable("id") Long sysBranchOfficeId);

    @GetMapping("/system/sysBranchOffice/getById/{id}")
    public ResultUtil<SysBranchOfficeBean> getSysBranchOfficeBeanById(@PathVariable("id") Long sysBranchOfficeId);

    @ApiOperation("获取已购买的所有系统")
    @GetMapping("/system/sysBranchOffice/getAllResources/{id}")
    public ResultUtil<SysBranchOfficeResources> getAllResources(@PathVariable("id") Long sysBranchOfficeId);
}
